//
//  RequestURL.m
//  HLZhiHuDaily
//
//  Created by 胡林 on 16/3/1.
//  Copyright © 2016年 胡林. All rights reserved.
//

#import "RequestURL.h"


@implementation RequestURL
//解析网址
+(void)getRequestWithUrl:(NSString *)URLString parameters:(id)parameters success:(successBlock)success failure:(failureBlock)failure{
    AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:kbaseURL]];
    [manager GET:URLString parameters:parameters success:^(NSURLSessionDataTask * _Nonnull task, id  _Nonnull responseObject) {
        if (success) {
            success(responseObject);
        }
    } failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
        if (failure) {
            failure(error);
        }
    }];

}

@end
